< prev index next >

src/java.base/share/classes/java/security/SecureRandom.java

Print this page




 634         return provider;
 635     }
 636 
 637     /**
 638      * Returns the name of the algorithm implemented by this
 639      * {@code SecureRandom} object.
 640      *
 641      * @return the name of the algorithm or {@code unknown}
 642      *          if the algorithm name cannot be determined.
 643      * @since 1.5
 644      */
 645     public String getAlgorithm() {
 646         return Objects.toString(algorithm, "unknown");
 647     }
 648 
 649     /**
 650      * Returns a Human-readable string representation of this
 651      * {@code SecureRandom}.
 652      *
 653      * @return the string representation
 654      *
 655      * @since 9
 656      */
 657     @Override
 658     public String toString() {
 659         return secureRandomSpi.toString();
 660     }
 661 
 662     /**
 663      * Returns the effective {@link SecureRandomParameters} for this
 664      * {@code SecureRandom} instance.
 665      * <p>
 666      * The returned value can be different from the
 667      * {@code SecureRandomParameters} object passed into a {@code getInstance}
 668      * method, but it cannot change during the lifetime of this
 669      * {@code SecureRandom} object.
 670      * <p>
 671      * A caller can use the returned value to find out what features this
 672      * {@code SecureRandom} supports.
 673      *
 674      * @return the effective {@link SecureRandomParameters} parameters,
 675      * or {@code null} if no parameters were used.




 634         return provider;
 635     }
 636 
 637     /**
 638      * Returns the name of the algorithm implemented by this
 639      * {@code SecureRandom} object.
 640      *
 641      * @return the name of the algorithm or {@code unknown}
 642      *          if the algorithm name cannot be determined.
 643      * @since 1.5
 644      */
 645     public String getAlgorithm() {
 646         return Objects.toString(algorithm, "unknown");
 647     }
 648 
 649     /**
 650      * Returns a Human-readable string representation of this
 651      * {@code SecureRandom}.
 652      *
 653      * @return the string representation


 654      */
 655     @Override
 656     public String toString() {
 657         return secureRandomSpi.toString();
 658     }
 659 
 660     /**
 661      * Returns the effective {@link SecureRandomParameters} for this
 662      * {@code SecureRandom} instance.
 663      * <p>
 664      * The returned value can be different from the
 665      * {@code SecureRandomParameters} object passed into a {@code getInstance}
 666      * method, but it cannot change during the lifetime of this
 667      * {@code SecureRandom} object.
 668      * <p>
 669      * A caller can use the returned value to find out what features this
 670      * {@code SecureRandom} supports.
 671      *
 672      * @return the effective {@link SecureRandomParameters} parameters,
 673      * or {@code null} if no parameters were used.


< prev index next >