encrypt/src/main/java/org/apache/sling/resource/encryption/impl/JCEKSKeyProvider.java [93:123]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    config.primaryAlias(), aliasIds.get(primaryId)));
        }

        aliasIds.put(primaryId, config.primaryAlias());
        crc.reset();
    }

    private byte[] toBytes(long value) {
        return new byte[] { (byte) (value >>> 24), (byte) (value >>> 16), (byte) (value >>> 8), (byte) value };
    }

    @Override
    public int getIdLength() {
        return 4;
    }

    @Override
    public byte[] getPrimaryKeyID() {
        return toBytes(primaryId);
    }

    @Override
    public Key getKey(byte[] id) throws GeneralSecurityException {
        Long value = toLong(id);
        String alias = aliasIds.get(value);
        if (alias == null) {
            if (!primaryId.equals(value)) {
                throw new GeneralSecurityException(
                        "ID that was provided does not match to any of the currently maintained aliases");
            }
            alias = config.primaryAlias();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



encrypt/src/main/java/org/apache/sling/resource/encryption/impl/OSGiKeyProvider.java [89:119]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    config.primaryAlias(), aliasIds.get(primaryId)));
        }

        aliasIds.put(primaryId, config.primaryAlias());
        crc.reset();
    }

    private byte[] toBytes(long value) {
        return new byte[] { (byte) (value >>> 24), (byte) (value >>> 16), (byte) (value >>> 8), (byte) value };
    }

    @Override
    public int getIdLength() {
        return 4;
    }

    @Override
    public byte[] getPrimaryKeyID() {
        return toBytes(primaryId);
    }

    @Override
    public Key getKey(byte[] id) throws GeneralSecurityException {
        Long value = toLong(id);
        String alias = aliasIds.get(value);
        if (alias == null) {
            if (!primaryId.equals(value)) {
                throw new GeneralSecurityException(
                        "ID that was provided does not match to any of the currently maintained aliases");
            }
            alias = config.primaryAlias();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



