FileDocCategorySizeDatePackage
SSLWrapper.javaAPI DocphoneME MR2 API (J2ME)2238Wed May 02 18:00:32 BST 2007com.sun.kvem.jsr082.obex

SSLWrapper

public final class SSLWrapper extends Object
The platform dependent class which provides a wrapper for security API in J2ME or J2SE.

Fields Summary
private com.sun.midp.crypto.MessageDigest
md5
Constructors Summary
SSLWrapper()

        try {
            md5 = MessageDigest.getInstance("MD5");
        } catch (GeneralSecurityException e) {
            throw new IOException(e.getMessage());
        }
    
Methods Summary
voiddoFinal(byte[] srcData, int srcOff, int srcLen, byte[] dstData, int dstOff)


        if (srcLen != 0) {
            md5.update(srcData, srcOff, srcLen);
        }

        try {
            md5.digest(dstData, dstOff, dstData.length - dstOff);
        } catch (DigestException e) {
            // Buffer too short
            throw new RuntimeException("output buffer too short");
        }
    
voidupdate(byte[] input, int offset, int length)

        md5.update(input, offset, length);