public synchronized Mac getHmac256 ( ) throws InvalidKeyException { if ( this . hmacSha256 == null ) { // Initializes the HMAC-SHA256 Mac and SecretKey. try { this . hmacSha256 = Mac . getInstance ( "HmacSHA256" ) ; } catch ( final NoSuchAlgorithmException e ) { throw new IllegalArgumentException ( ) ; } this . hmacSha256 . init ( new SecretKeySpec ( this . key , "HmacSHA256" ) ) ; } return this . hmacSha256 ; }
Gets the HmacSha256 associated with the account key .