src/main/java/org/tinyradius/packet/RadiusPacket.java
protected byte[] createResponseAuthenticator(String sharedSecret, int packetLength, byte[] attributes, byte[] requestAuthenticator) {
        MessageDigest md5 = getMd5Digest();
        md5.reset();
        md5.update((byte) getPacketType());
        md5.update((byte) getPacketIdentifier());
        md5.update((byte) (packetLength >> 8));
        md5.update((byte) (packetLength & 0x0ff));
        md5.update(requestAuthenticator, 0, requestAuthenticator.length);
        md5.update(attributes, 0, attributes.length);
        md5.update(RadiusUtil.getUtf8Bytes(sharedSecret));
        return md5.digest();
    }
/**
     * Creates an authenticator for a Radius response packet.
     *
     * @param sharedSecret         shared secret
     * @param packetLength         length of response packet
     * @param attributes           encoded attributes of response packet
     * @param requestAuthenticator request packet authenticator
     * @return new 16 byte response authenticator
     */
Creates an authenticator for a Radius response packet.


Creates an authenticator for a Radius response packet .
protected byte[] createResponseAuthenticator(String sharedSecret, int packetLength, byte[] attributes, byte[] requestAuthenticator) {
        MessageDigest md5 = getMd5Digest();
        md5.reset();
        md5.update((byte) getPacketType());
        md5.update((byte) getPacketIdentifier());
        md5.update((byte) (packetLength >> 8));
        md5.update((byte) (packetLength & 0x0ff));
        md5.update(requestAuthenticator, 0, requestAuthenticator.length);
        md5.update(attributes, 0, attributes.length);
        md5.update(RadiusUtil.getUtf8Bytes(sharedSecret));
        return md5.digest();
    }
protected byte [ ] createResponseAuthenticator ( String sharedSecret , int packetLength , byte [ ] attributes , byte [ ] requestAuthenticator ) { MessageDigest md5 = getMd5Digest ( ) ; md5 . reset ( ) ; md5 . update ( ( byte ) getPacketType ( ) ) ; md5 . update ( ( byte ) getPacketIdentifier ( ) ) ; md5 . update ( ( byte ) ( packetLength >> 8 ) ) ; md5 . update ( ( byte ) ( packetLength & 0x0ff ) ) ; md5 . update ( requestAuthenticator , 0 , requestAuthenticator . length ) ; md5 . update ( attributes , 0 , attributes . length ) ; md5 . update ( RadiusUtil . getUtf8Bytes ( sharedSecret ) ) ; return md5 . digest ( ) ; }
Creates an authenticator for a Radius response packet.
Creates an authenticator for a Radius response packet .