Code example for NoSuchAlgorithmException

Methods: getMessage

0
            String digsestFunction = "SHA-256";
            MessageDigest dgst = MessageDigest.getInstance(digsestFunction);
            byte[] byteValue = dgst.digest(value.getBytes());
            return Base64.encode(byteValue);
        } catch (NoSuchAlgorithmException e) {
            log.error(e.getMessage(), e);
            throw new UserStoreException(e.getMessage(), e);
        } 
    } 
 
    /** 
     * Set claim to user store manager 
     * 
     * @param userName user name 
     * @param tenantId  tenant id 
     * @param claim  claim uri 
     * @param value  claim value 
     * @throws IdentityException if fails 
     */ 
    public static void setClaimInUserStoreManager(String userName,int tenantId, String claim,
                                                  String value) throws IdentityException {